<!-- 产品内容页默认模板 -->
<!-- inc:inc.head -->




<div id="bd">

    <div id="md_catenav">
        <a href="#" class="mleft">left</a>
        <?php
        $cates =  QGMOD_SONCATE(22,false);
        $cate_id = isset($pid)?$pid:$rs['cateid'];
        $n = 0;
        foreach($cates as $key=>$value){
            if($value['id']==$cate_id){
                $n = $key;
                break;
            }
        }
        ?>
        <input type="hidden" value="<?php echo $n; ?>" id="defSet" />
        <div class="nav"><ul class="clearfix" style="left:-<?php echo ($n-2)*300; ?>px">
            <?php 
            foreach($cates as $key=>$value){?>
            <li <?php if($value['id']==$cate_id){echo 'class="on"';}?> ><a href="{:$f}.php?id={:$value[id]}" ><img src="{:$value[pic]}"/></a></li>
            <?php }?>
        </ul></div>
        <a href="#" class="mright">right</a>
    </div>
    
    <div id="toolbar" class="clearfix">
    	<div id="md_sitemap">
    	    <a href="home.php">Home</a>>
    	    <!-- $lead_menu AS $key=>$value -->
    	    <a href="{:$value[url]}">{:$value[name]}</a>>
    	    <!-- end -->
            <a>{:$rs[subject]}</a>
    	</div>
    	<!-- inc:inc.search -->
    </div>
    
    <div id="pdinfo" class="yui-g">
        <div class="yui-u first">
            <div id="md_pdimgs" class="clearfix">
                <div class="img">
                    <a href="#">
                        <?php if(isset($rsImg[0]['filename'])){ ?>
                        <img src="<?php echo $rsImg[0]['folder'].$rsImg[0]['filename'];?>" />
                        <?php }else{ ?>
                        <img src="images/nopicture_400_300.gif" />
                        <?php } ?>
                    </a>
					<span class="imgnum">1</span>
                </div>
				<div class="img-warp clearfix">
					<div class="info-tab clearfix" style="zoom:1;">
						<div><a href="<?php echo 'productInfo.php?f=list&id='.$pid; ?>" <?php if(!isset($type)||$id==$pid){echo 'class="on"';} ?> >概述</a></div>
						<div><a href="<?php echo 'productInfo.php?f=list&id='.$pid; ?>&type=0" <?php if($type=='0'&&$id!=$pid){echo 'class="on"';} ?> >手板</a></div>
						<div><a href="<?php echo 'productInfo.php?f=list&id='.$pid; ?>&type=1" <?php if($type=='1'&&$id!=$pid){echo 'class="on"';} ?> >服装</a></div>
						<div><a href="<?php echo 'productInfo.php?f=list&id='.$pid; ?>&type=2" <?php if($type=='2'&&$id!=$pid){echo 'class="on"';} ?> >包装</a></div>
					</div>
	                <div class="timgs">
	                    <a href="#" class="up">up</a>
	                    <div class="imgct"><div class="imgctin">
	                        <?php foreach($rsImg as $key=>$value){?>
	                        <a href="#" <?php if($key==0){echo 'class="on"';}?> idx="<?php echo $key+1;?>"><img src="{:$value[folder]}{:$value[thumbfile]}" bimg="{:$value[folder]}{:$value[filename]}" /></a>
	                        <?php } for($i=count($rsImg);$i<6;$i++){?>
	                        <a href="#"><em>NO Picture</em></a>
	                        <?php }?>
	                    </div></div>
	                    <a href="#" class="down">down</a>
	                </div>
				</div>
            </div>
        </div>
        <div class="yui-u second">
            <div id="md_pdtitle">{:$rs[subject]}</div>
            <div id="md_pdinfo">
                <div class="hd"></div>
                <div class="bd">
                	<?php if(!isset($type)||$id==$pid){?>
                    <ul class="att">
                        <li><em>Product Code：</em>{:$rs[ext_number]}</li>
                        <li><em>Product：</em>{:$rs[subject]}</li>
                        <li><em>Release Date：</em><?php echo date('Y-m',strtotime($rs[onsaledate]));?></li>
                        <li><em>Edition：</em>{:$rs[ext_1]}</li>
                        <li><em>Product Status：</em>{:$rs[ext_6]}</li>
                        <?php if($rs[ext_3]!=''){ ?><li><em>Body Color：</em>{:$rs[ext_3]}</li><? } php?>
                        <?php if($rs[ext_4]!=''){ ?><li><em>Interior Color：</em>{:$rs[ext_4]}</li><? } php?>
                        <?php if($rs[ext_5]!=''){ ?><li><em>Braking Calipers：</em>{:$rs[ext_5]}</li><? } php?>
                        <li><em>MSRP：</em>${:$rs[ext_marketprice]} USD</li>
                    </ul>
					<? } ?>
                    <div class="content">{:$content}</div>
                    <?php if($rs[isShop]=='1'&&!isset($type)){ ?>
                    <div class="buy clearfix">
                        <a class="btn" href="#">Buy</a>
                        <div class="form">
                            <?php echo $buylink; ?>
                        </div>
                    </div>
                    <? } ?>
                </div>
                <div class="ft"></div>
            </div>
        </div>
        <div class="clear"></div>
    </div>
</div>

<!-- inc:inc.foot -->